<?php
include('func.php');
$action = $_GET['a'];

switch($action){
	case 'mem':
		$data = memStatus();
		break;
	case 'cpu':
		$data = sysStatus();
		break;
	case 'network':
		$data = networkUseage();
		break;
	case 'all':
		$data['mem'] = memStatus();
		$data['cpu'] = sysStatus();
		$data['network'] = networkUseage();
		
}

if($data){
	echo json_encode($data);
}